package tech.waterism.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import tech.waterism.enums.CalTypeEnum;
import tech.waterism.enums.PrincipleLogicEnum;

import java.util.List;

@Data
public class PrincipleRecord {
    @ApiModelProperty("record编码")
    private String recordNo;
    /**
     * 执行判定(一定是相邻的两个时刻有先后顺序)
     */
    @ApiModelProperty(value = "执行判定")
    private String parentRecordNo;

    /**
     * 执行判定，前序中数据的执行逻辑
     */
    private List<ParentRecordNoLogic> parentRecordNoLogics;
    /**
     * 排序
     */
    @ApiModelProperty(value = "排序")
    private int sort;
    /**
     * 计算类型
     */
    private CalTypeEnum calType;

    // 条件
    /**
     * 有无条件
     */
    @ApiModelProperty(value = "有无条件")
    private Boolean withCondition;
    /**
     * 规则逻辑
     */
    @ApiModelProperty(value = "规则逻辑")
    private PrincipleLogicEnum logic;
    /**
     * 条件
     */
    @ApiModelProperty(value = "条件")
    private List<PrincipleCondition> conditions;

    /**
     * 控制手段
     */
    @ApiModelProperty(value = "控制手段")
    private List<PrincipleControl> controls;

    /**
     * 约束条件
     */
    @ApiModelProperty("约束条件")
    private List<PrincipleConstraint> constrains;

    /**
     * 是否存在适用日期范围
     */
    @ApiModelProperty(value = "是否存在适用日期范围")
    private Boolean withRange;
    /**
     * 适用开始日期
     */
    @ApiModelProperty(value = "适用开始日期")
    private String applicableStartDate;
    /**
     * 适用结束日期
     */
    @ApiModelProperty(value = "适用结束日期")
    private String applicableEndDate;

    private AlgorithmDispatch algorithm;
}
